package com.gmall.rabbitmq.config;

import org.springframework.amqp.core.Queue;
import org.springframework.amqp.core.QueueBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class DefaultExchange_Queue_Config {

    public final static String DEFAULT_EX_QUEUE = "default_queue";
    public final static String DEFAULT_EX_QUEUE_1 = "default_queue1";

    public final static String DEFAULT_EX_QUEUE_2 = "default_queue2";
    // 声明队列
    @Bean(DEFAULT_EX_QUEUE)
    public Queue default_ex_queue(){
        return QueueBuilder.durable(DEFAULT_EX_QUEUE).build();
    }
    @Bean(DEFAULT_EX_QUEUE_1)
    public Queue default_ex_queue1(){
        return QueueBuilder.durable(DEFAULT_EX_QUEUE_1).build();
    }

    @Bean(DEFAULT_EX_QUEUE_2)
    public Queue default_ex_queue2(){
        return QueueBuilder.durable(DEFAULT_EX_QUEUE_2).build();
    }

}
